package com.ymh.spring.learn.mq.activitymq.producer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppProducer {

	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("activitymq-producer.xml");

		context.start();
		ProducerService producerService = context.getBean(ProducerService.class);

		for (int i = 0; i < 100; i++) {
			producerService.sendMessage("测试消息test" + i);
		}
		context.close();
	}

}
